package com.base.mapper;

import com.base.entity.FeeRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 作者
 * @since 2024-11-30
 */
@Mapper
public interface FeeRecordMapper extends BaseMapper<FeeRecord> {

    @Select("SELECT SUM(amount) AS total_amount\n" +
            "FROM fee_record\n" +
            "WHERE DATE(create_at) = CURDATE();\n")
    BigDecimal getTodayAmount();
}
